package com.labManage.util;

import org.springframework.util.DigestUtils;

public class Md5Util {

    //将一个字符串MD5加密
    public static String getMd5Simple(String password){
        String md502 = DigestUtils.md5DigestAsHex(password.getBytes());
        return md502;
    }
    //进行两次加密
    public static String getMd5(String password){
        String md501= DigestUtils.md5DigestAsHex(password.getBytes());
        String temp =md501.substring(0, 8);
        String md502 =DigestUtils.md5DigestAsHex((temp+md501).getBytes());
        return md502;
    }
}
